package com.huawei.hms.support.api.hwid;

import android.content.Intent;
import com.huawei.hms.core.aidl.IMessageEntity;
import com.huawei.hms.support.api.PendingResultImpl;
import com.huawei.hms.support.api.client.ApiClient;
import com.huawei.hms.support.api.client.Result;
import com.huawei.hms.support.api.entity.hwid.HwIDConstant.RETKEY;
import com.huawei.hms.support.api.entity.hwid.SignInResp;
import com.huawei.hms.support.log.HMSLog;

class HuaweiIdApiImpl$1 extends PendingResultImpl<SignInResult, SignInResp> {
    final /* synthetic */ HuaweiIdApiImpl a;

    HuaweiIdApiImpl$1(HuaweiIdApiImpl huaweiIdApiImpl, ApiClient apiClient, String str, IMessageEntity iMessageEntity) {
        this.a = huaweiIdApiImpl;
        super(apiClient, str, iMessageEntity);
    }

    public /* synthetic */ Result onComplete(IMessageEntity iMessageEntity) {
        return a((SignInResp) iMessageEntity);
    }

    public SignInResult a(SignInResp signInResp) {
        HMSLog.i("HuaweiIdApiImpl", "signIn onComplete:" + signInResp.getRetCode());
        HuaweiIdApiImpl.a(this.a, signInResp.getRetCode());
        Intent data = signInResp.getData();
        data.putExtra(RETKEY.RETCODE, signInResp.getRetCode());
        return this.a.getHwIdSignInResultFromIntent(data);
    }
}
